{extend name="layout/layout" /}

{block name="content"}
<input type="hidden" class="cityId" value="{$info.cityId}">
<input type="hidden" class="xianId" value="{$info.xianId}">
<input type="hidden" class="townId" value="{$info.townId}">
<input type="hidden" class="villageId" value="{$info.villageId}">
<div class="row">
    <div class="col-md-12">
        <div class="portlet light">
            <div class="portlet-title">
                <div class="caption">
                    <i class="icon-share font-dark"></i>
                    <span class="caption-subject font-dark bold uppercase"> 编辑管理员</span>
                </div>
                <div class="actions">
                    <a class="btn btn-circle btn-icon-only btn-default fullscreen" href="javascript:;" data-original-title="" title=""> </a>
                </div>
            </div>
            <div class="portlet-body">
                <form class="form-horizontal" method="post" enctype="multipart/form-data">
                    <div class="form-body">
                        <div class="row" style="margin-bottom: 10px;">
                            <div class="col-md-9">
                                <div class="form-inline">
                                    <label class="control-label col-md-3">
                                        管理范围
                                        <span class="required">*</span>
                                    </label>
                                    <div class="col-md-9">
                                        {include file="common:selectarea" /}
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-9">
                                <div class="form-group">
                                    <label class="control-label col-md-3">
                                        管理员账号
                                        <span class="required">*</span>
                                    </label>
                                    <div class="col-md-9">
                                        <input type="text" class="form-control" id="loginName" placeholder="登录名，只能输入字母和数字，最多10字" maxlength="40" name="loginName" onkeyup="this.value=this.value.replace(/[^\w]/g,'')" onpaste="this.value=this.value.replace(/[^\w]/g,'')" value="{$info.loginName}" required>
                                        <input type="hidden" name="oldLoginName" value="{$info.loginName}">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-9">
                                <div class="form-group">
                                    <label class="control-label col-md-3">
                                        登录密码
                                        <span class="required">*</span>
                                    </label>
                                    <div class="col-md-9">
                                        <input type="password" class="form-control" maxlength="40" placeholder="不填，则不修改" name="pass_one" value="" required>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-9">
                                <div class="form-group">
                                    <label class="control-label col-md-3">
                                        确认密码
                                        <span class="required">*</span>
                                    </label>
                                    <div class="col-md-9">
                                        <input type="password" class="form-control" maxlength="40" placeholder="不填，则不修改" name="pass_tow" value="" required>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-9">
                                <div class="form-group">
                                    <label class="control-label col-md-3">
                                        管理人员<span class="required">*</span>
                                    </label>
                                    <div class="col-md-9">
                                        <button class="add-btn form-control" type="button"  data-title="选择">{$info->member->name}</button>
                                        <input type="hidden" name="memberId" value="{$info.memberId}">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-9">
                                <div class="form-group">
                                    <label class="control-label col-md-3">
                                        管理权限<span class="required">*</span>
                                    </label>
                                    <div class="col-md-9">
                                        {volist name="menu" id="vo"}
                                            {volist name="vo" id="mm"}
                                                <label class="mt-checkbox" style="width: 120px;">
                                                    <input type="checkbox" name="menuId" {in name="mm.id" value="$info.menuId"} checked {/in} value="{$mm.id}"> {$mm.name}
                                                    <span></span>
                                                </label>
                                                <!--<span style="width: 88px;display: inline-block;line-height: 30px;">
                                                    <input type="checkbox" name="menuId" {in name="mm.id" value="$info.menuId"} checked {/in} value="{$mm.id}">
                                                    <span>{$mm.name}</span>
                                                </span>-->
                                            {/volist}
                                            <br />
                                        {/volist}
                                    </div>
                                </div>
                            </div>
                        </div>
                        <input type="hidden" name="id" value="{$info.id}">

                        <hr />
                        <div class="row">
                            <div class="form-actions">
                                <div class="col-md-offset-2 col-md-10">
                                    <button type="button" id="form-submit" class="btn blue save-btn">
                                        保存 <i class="fa fa-floppy-o"></i>
                                    </button>
                                    <button type="button" class="btn default" onclick="history.go(-1);">
                                        返回 <i class="fa fa-mail-forward"></i>
                                    </button>
                                </div>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<input type="hidden" class="token_url" value="{:url('admin/Image/token')}">
<input type="hidden" class="record_url" value="{:url('admin/Image/record')}">
<input type="hidden" class="delimage_url" value="{:url('admin/Image/delete')}">


{/block}

{block name="pagescript"}
<script>
    var posturl = "{:url('admin/'.strtolower($model).'/editPost')}";
    var partylist = "{:url('admin/layer/partyList')}";
    var areaurl = "{:url('admin/layer/getCounty')}";    
    var villageurl = "{:url('admin/layer/getVillage')}";
</script>
<script src="__STATIC__/admin/pages/js/operator.js" type="text/javascript"></script>
{/block}